home *** CD-ROM | disk | FTP | other *** search
- ROTG(3F) Last changed: 11-2-98
-
-
- NNAAMMEE
- SSRROOTTGG, DDRROOTTGG - Constructs a Givens plane rotation
-
- SSYYNNOOPPSSIISS
- Real
-
- CCAALLLL SSRROOTTGG ((_a,, _b,, _c,, _s))
-
- Double precision
-
- CCAALLLL DDRROOTTGG ((_a,, _b,, _c,, _s))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- DDRROOTTGG/SSRROOTTGG computes the elements of a rotation matrix such that:
-
- _ _ _ _ _ _
- | c s | | a | | r |
- |-s c | * | b | = | 0 |
- - - - - - -
-
- where
- 2 2 2 2
- r = +- sqrt (a + b ) and c + s = 1
-
- These routines have the following arguments:
-
- _a First vector component. (input and output)
-
- SSRROOTTGG (Real), DDRROOTTGG (Double precision):
- On input, the first component of the vector to be rotated. On
- output, _a is overwritten by by _r, the first component of the
- vector in the rotated coordinate system where:
- 2 2
- r = sign(sqrt(a + b ),a), if |a| > |b|
-
-
- 2 2
- r = sign(sqrt(a + b ),b), if |a| <= |b|
-
- _b Second vector component. (input and output)
- SSRROOTTGG: Real.
- DDRROOTTGG: Double precision.
- On input, the second component of the vector to be rotated. On
- output, _b contains _z, where:
- _z=_s if |_a| > |_b|
- _z=1/_c if |_a| <= |_b| and _c =/ 0
- z=1 if c = 0.
-
- _c Cosine of the angle of rotation. (output)
- SSRROOTTGG: Real.
- DDRROOTTGG: Double precision.
-
- _s Sine of the angle of rotation. (output)
- SSRROOTTGG: Real.
- DDRROOTTGG: Double precision.
-
-
-
- NNOOTTEESS
- SSRROOTTGG/DDRROOTTGG routines are Level 1 Basic Linear Algebra Subprograms
- (Level 1 BLAS).
-
- The value of _z, returned in _b by SSRROOTTGG, gives a compact representation
- of the rotation matrix, which can be used later to reconstruct _c and _s
- as in the following example:
-
- IF (B .EQ. 1. ) THEN
- C = 0.
- S = 1.
- ELSEIF( ABS( B) .LT. 1) THEN
- C = SQRT( 1. - B * B)
- S = B
- ELSE
- C = 1. / B
- S = SQRT( 1 - C * C)
- ENDIF
-
- SSEEEE AALLSSOO
- RROOTT(3F), RROOTTMM(3F), RROOTTMMGG(3F)
-
- This man page is available only online.
-